package lib

import (
	"net/http"
)

type Response struct {
	Code int         `json:"code"`
	Data interface{} `json:"data"`
	Msg  string      `json:"msg"`
}

func Success(data interface{}) Response {
	res := Response{Code: http.StatusOK, Data: data, Msg: "success"}
	return res
}

func Fail(code int, msg string) Response {
	res := Response{Code: code, Msg: msg}
	return res
}
